Skip to content

Implement Civ3 Clean Map and Center Screen map menu options - #1113

Open
Billytifft wants to merge 1 commit into
C7-Game:Developmentfrom
Billytifft:billy/clean-map-setting
Open

Billytifft wants to merge 1 commit into
C7-Game:Developmentfrom
Billytifft:billy/clean-map-setting

Conversation

@Billytifft

Copy link
Copy Markdown
Contributor

Summary

Implements the remaining Civ3-style Map menu items for Center Screen and Clean Map.

  • Adds a Center Screen (C) button immediately after the Grid settings button. It reuses the existing C hotkey logic.
  • Adds a Clean Map toggle with the Civ3 shortcut Ctrl+Shift+M. The toggle state is session-only.
  • Adds a Clean Map Preferences menu with shortcut Ctrl+Shift+N.
  • Adds all 13 Civ3 Clean Map preferences, with the default checkbox states from the referenced screenshot:
    • Hide Rivers/Flood Plains
    • Hide Mountains
    • Hide Hills
    • Hide Forests/Jungles
    • Hide Terrain Buildings (Mines, Colonies, etc.)
    • Hide Roads/Railroads
    • Hide Irrigation
    • Hide Natural Resources
    • Hide Food/Shield Icons
    • Hide Pollution
    • Hide Territory Boundaries
    • Hide Cities
    • Hide Units
  • Preference values persist through C7Settings / C7.ini.
  • The existing Ctrl+Alt+Shift+M reveal-map shortcut is unchanged; the new Clean Map shortcut only fires when Alt is not held.

Implementation notes

  • CleanMapSettings owns the preference definitions, defaults, persistence, and the active Clean Map toggle state.
  • MapView.ApplyCleanMapPreferences() applies the current settings to the relevant map layers.
  • Individual layers suppress their own drawing where a whole-layer hide would be too broad:
    • HillsLayer: separate mountain/volcano and hill handling, plus vegetation on hills.
    • TileOverlayLayer: roads, railroads, irrigation, pollution/craters, and other terrain improvements.
    • TileAssignmentLayer: food/shield icons.
    • UnitLayer and CityLayer: animated unit/city child nodes are hidden as well.
  • Checkbox rendering was added to the shared InteractablePopUpController. OptionsPopUp now accepts optional checkbox options, so no dedicated checkbox popup class is needed.
  • Confirming the preferences popup saves all checkbox values; Cancel discards changes.

Verification

  • dotnet build C7/C7.sln — 0 errors
  • dotnet test C7/C7.sln with CIV3_HOME — 392 passed, 0 failed
  • dotnet format C7/C7.sln whitespace --verify-no-changes — clean

@Billytifft
Billytifft force-pushed the billy/clean-map-setting branch from 5b6fd53 to 14a09c8 Compare November 17, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant